home *** CD-ROM | disk | FTP | other *** search
/ Danny Amor's Online Library / Danny Amor's Online Library - Volume 1.iso / html / faqs / faq / 386bsd-faq / part6 < prev    next >
Encoding:
Text File  |  1995-07-25  |  23.6 KB  |  680 lines

  1. Subject: [comp.os.386bsd] BNR/2 derived BSD for PCs FAQ (Part 6 of 10)
  2. Newsgroups: comp.os.386bsd.announce,comp.answers,news.answers
  3. From: burgess@cynjut.infonet.net (Dave Burgess)
  4. Date: 13 Nov 1994 10:41:50 -0600
  5.  
  6. Posted-By: auto-faq 3.1.1.2
  7. Archive-name: 386bsd-faq/part6
  8.  
  9. Section 5.    (Kernel Replacements)
  10.  
  11. 5.0    Introduction
  12.  
  13.     This section is supposed to document the unusual or optional
  14.     kernel add-ons that are available from various places.  As 
  15.     they are included in the mainstream of the various Berkeley
  16.     Net Release systems, they will slowly come out of here.
  17.  
  18.     If you know of any replacement parts for the kernel, please 
  19.     send Dave Burgess (burgess@cynjut.infonet.net) a message 
  20.     detailing the package (possibly include a README), where it 
  21.     can be found, and what version of the OS (ie. NetBSD, 
  22.     386bsd 0.1 + pk 0.2, FreeBSD) it was designed to run under.
  23.  
  24.  
  25. 5.1    Available Kernel Replacements
  26.  
  27.  
  28. 5.1.1    keycap/codrv
  29.  
  30.     These server as replacements for the generic pccons driver
  31.     that comes (by default) with 386bsd 0.1.
  32.  
  33.     Holger Veit (author of these) writes:
  34.  
  35.     "The same type of driver, but keycap has the version number 0.1.1
  36.     and codrv has the version number 0.1.2.  The latter is much 
  37.     improved and downward compatible.  Codrv was developed to provide
  38.     a universal way of mapping national keyboard layouts during
  39.     runtime (ie, not by patching the kernel tables) and providing
  40.     better X11 support.  Codrv uses a superset of the pc3 terminal 
  41.     emulation, and a termcap-like database for keymaps (therefore
  42.     "keycap").  X11 is supported by two dedicated console raw devices
  43.     /dev/kbd and /dev/vga, which avoids all the existing problems
  44.     pccons has with X11.  The latest version has virtual consoles.
  45.     Codrv will become part of patchkit 0.2.4"
  46.  
  47.     
  48.  
  49. 5.1.2    pcvt
  50.  
  51.     A superset of pccons, this driver supports virtual consoles, 
  52.     and some form of database oriented keyboard mappings.  It was
  53.     also designed to emulate a vt220 terminal as best as possible.
  54.  
  55.     (This section originally identified Joerg Wuensch as the
  56.     author. Hellmuth Michealis is the author of pcvt.  Joerg was the 
  57.     author of the original post.  This update is from Hellmuth
  58.     himself.  Apologies from the FAQ staff...)
  59.  
  60.     The last release of pcvt is version 3.00 and was done on March
  61.     1st 1994 to the newsgroup comp.sources.misc, Volume 41, Issue
  62.     140-152 (part 1-13).  Future releases and upgrades will be done
  63.     as patches or new releases to that newsgroup.
  64.  
  65.     pcvt was recently put into the kernel sourcetree of
  66.     NetBSD-current (pre 1.0) into /sys/arch/i386/isa/pcvt.
  67.  
  68.     pcvt is also available in the FreeBSD contributed tree at
  69.     location /usr/ports/util/pcvt.
  70.  
  71.     The pcvt package consists of:
  72.  
  73.     - the driver itself
  74.     - complete documentation for installation and operation
  75.     - termcap/terminfo, pcvt.el, rc.local, /etc/ttys, xmodmap examples
  76.     - cursor, utility to set the cursor size and shape
  77.     - fed, a curses-based EGA/VGA character set editor
  78.     - fontedit, utility to edit the VT220 downloadable character set
  79.     - ispcvt, utility to display the drivers compile time configuration
  80.     - kcon, utility to setup national keyboard layouts and remap keys
  81.     - keycap, keyboard mapping database library similar to termcap
  82.     - loadfont, utility to load up to 4/8 fonts into an EGA/VGA board
  83.     - mcon, utility to control/configure a keyboard based mouse emulator
  84.     - scon, utility to runtime configure the video part of pcvt
  85.     - userkeys, utility to set the VT220 user programmable function keys
  86.     - vttest, VT100 compatibility torture test program
  87.     - demo, color- characterset- and attribute demos
  88.     and more ....
  89.  
  90.     See the README-file for the latest release (3.00) of pcvt for
  91.     lots more information and a complete list of the contributors
  92.     to this project.
  93.  
  94.  
  95. 5.1.3    syscons
  96.  
  97.     Another superset of pccons that was designed to emulate SCO as
  98.     well as possible.  Many of the ioctls from SysV have been 
  99.     implemented.  XFree86 2.0 no longer requires special patches 
  100.     to be run with kernels using this console driver.
  101.  
  102.  
  103. 5.1.4    Fast Symbolic Links
  104.  
  105.     The following is taken from the README for the fast sym-links
  106.     patch:
  107.  
  108.     "This cruddy but complete hack answers one of the objections to
  109.      symlinks: that they are slow, and cost an entire frag.  Symlinks
  110.      of less than length 60 are stored in the inode itself.  Symlinks
  111.      longer than this are still in the inode.  To make the illusion
  112.      of normality complete, dump and fsck also need changing.  
  113.      Additionally, I made dumpfs verbose to excess."
  114.  
  115.     Fast Symbolic Links are supported natively in FreeBSD and NetBSD.
  116.  
  117.  
  118. 5.1.5    npx fixes
  119.  
  120.     There are problems with the floating point error handling 
  121.     routines, and there are fixes available for this problem provided
  122.     by Bruce Evans (of Minix-386 fame)
  123.  
  124.     Note that most of the code is applicable to floating point hardware
  125.     as opposed to emulation.
  126.  
  127.     The newest version (and now official) fixes to this are in
  128.     patchkit-0.2.4.
  129.  
  130.     There are still some nits in the npx emulation code in both FreeBSD
  131.     and NetBSD.  They are being worked on.
  132.  
  133.  
  134. 5.1.6    CGD's COM drivers
  135.  
  136.     Chris G. Demetriou (cgd@blah blah blah) has written some COM drivers
  137.     for 386bsd.  These, among other things, support multi-port serial
  138.     packages.
  139.  
  140.     This driver was the basis for the FreeBSD com subsystem.  NetBSD
  141.     does not use them.  There are patch files around that added
  142.     some of the missing functionality to NetBSD.  Multiport comm
  143.     support is included in both FreeBSD and NetBSD.
  144.  
  145.  
  146. 5.1.7    Tom Ivar Helbekkmo's wd.c replacement
  147.  
  148.     Tom Ivar Helbekkmo (tih@barsoom.nhh.no) has rewritten much of the
  149.     386bsd 0.1 wd.c file that handles common hard disks, and added 
  150.     many new features to the code.
  151.  
  152.     The patches to use these can be obtained from barsoom.nhh.no
  153.     in pub/386bsd.  Users should consult the README file for more
  154.     information.
  155.  
  156.     Also, it should be noted that NetBSD uses these drivers as their
  157.     stock drivers.
  158.  
  159.     FreeBSD uses similar changes.
  160.  
  161.  
  162. 5.1.8    Interruptless LPT Driver Kit
  163.  
  164.     This driver was designed with faster performance and lower system
  165.     load in mind.  See the INSTALL-NOTES that come with the package
  166.     for more details and installation information.
  167.  
  168.     This is also included in NetBSD and FreeBSD.  Note that with some
  169.     printers, it may be prefereable to ignore the status port and rely
  170.     on the data port.  If you have tried everything else and the
  171.     interruptless printer driver still does not work for you, you may
  172.     need to play with this.
  173.  
  174.     It has also been determined that the interruptless driver may be
  175.     (or already has been) removed from the system.  A newer lpt driver
  176.     has been developed that removes many of the overhead problems that
  177.     the original 386bsd lpt driver had.
  178.  
  179.  
  180. 5.2    Floppy Disk problems.
  181.  
  182.     One of the most common problems in 386BSD involves working with 
  183.     new boot sector and/or reformatting a floppy.  Dave Silvia 
  184.     provided this section on using floppy disks.
  185.  
  186.  
  187. 5.2.1    How do I get a bootable floppy?
  188.  
  189.     Several ways, ranging from brain-dead-but-works to simplest.  
  190.     Classification into categories is left to the reader (is there 
  191.     really a difference between 'brain-dead' and 'simple'?:')
  192.  
  193.     1) rawrite (or dd) dist.fs (or fixit.fs) to a disk,
  194.        mount it, cd to the mount point, and execute:
  195.  
  196.         rm -rf .
  197.  
  198.        you now have a bootable floppy!;^}
  199.  
  200.     2) Take your existing dist.fs or fixit.fs boot disk and
  201.        diskcopy it on a DOS machine.  Mount and rm as in 1)
  202.        above.  Again, you have a bootable floppy!;^}
  203.  
  204.     3) Run disklabel on the floppy, e.g.:
  205.  
  206.         disklabel -w -r fd0a floppy5
  207.  
  208.        where 'floppy5' is a 'name' for an entry in the /etc/disktab
  209.        file.  You'll get a couple of ioctl errors because writing a 
  210.        label to a floppy isn't supported (yet?), but the boot blocks 
  211.        have indeed been written.
  212.  
  213.     4) Write the boot blocks to the floppy:
  214.  
  215.         cat /usr/mdec/fdboot /usr/mdec/bootfd | dd of=/dev/rfd0a
  216.  
  217.        or, more simply:
  218.  
  219.         cat /usr/mdec/fdboot /usr/mdec/bootfd > /dev/rfd0a
  220.  
  221.     Methods 3) and 4) require you to run newfs on the floppy, e.g.:
  222.  
  223.     newfs /dev/rfd0a floppy5
  224.  
  225.     If you have a floppy that was originally bootable, but the boot
  226.     blocks were somehow damaged, you can use method 3) or 4) to
  227.     restore boot-ability (do _NOT_ run newfs).  You _could_, through
  228.     the convolutions of copying a floppy whose boot blocks are damaged
  229.     to a temporary location and then re-copying to a bootable floppy,
  230.     use method 1) or 2) (if you really want to!;^})
  231.  
  232.     5)  If the disk is already newfs'ed and is otherwise ready to use,
  233.     disklabel will write the boot blocks on the disk.  Read the man page
  234.     for disklabel.
  235.  
  236.  
  237. 5.2.2    How do I maximize the space on a mountable floppy disk.
  238.  
  239.     As you all know, when you are working with a floppy, it is usually
  240.     more important that the floppy have a lot of room, rather than a
  241.     lot of other 'stuff'.  Here is the magic incantation that will
  242.     maximize the amount of free space on the disk.
  243.  
  244.         newfs -Tfloppy[35] -i[4096 | 8192] -c 80 /dev/fd[0|1]a
  245.  
  246.     This leaves the disk with fewer inodes and only one cylinder group.
  247.  
  248.  
  249. 5.3    Character Device Driver info
  250.  
  251.     These devices are also often referred to as character devices.
  252.     
  253. 5.3.1    Printers
  254.  
  255.     Configuring a parallel printer for 386bsd requires a working 
  256.     printer driver to be installed in the kernel.  386bsd 0.1 does 
  257.     not include a printer driver in the stock distribution kernel.
  258.     NetBSD and FreeBSD both include this driver in their stock 
  259.     manifestations.
  260.  
  261.     It is possible to connect a serial printer to either.  This brief
  262.     tutorial is provided by Daryl Berryhill 
  263.     (djberry2@b25info.b25.ingr.com)
  264.  
  265.     The way I got my printer to work.
  266.  
  267.     1) connect a 25 pin to 9 pin null modem cable to printer and 
  268.        computer.
  269.     2) set printer to 9600 baud, 7 data bits, even parity.
  270.     3) configure /dev/com1 (DOS COM2) port the same way as the printer
  271.     4) add a line to /etc/printcap that says:
  272.            lp|local line printer:\
  273.               :lp=/dev/com2:wq:sd=/var/spool/lpd:lf=/var/log/lpd-errs:\
  274.               :br#9600
  275.     5) type "lpr <add filename here>"
  276.     6) type "lpd"
  277.        and it should start printing.
  278.  
  279.     An obvious point, but make sure that you do NOT start a getty on 
  280.     on the com port.  Check the /etc/ttys file and make sure that 
  281.     the com port you select is not active.
  282.  
  283.     There have been many reports in the past of people not being able 
  284.     to get their parallel port printer working.  One of the problems
  285.     seems to be cables.  Another problem may be with the hardware.  
  286.     A seemingly stupid suggestion is to replace your printer card with
  287.     the cheapest parallel port card you can find.  I am using a $10
  288.     single parallel, two serial port card that I got from Altex.  
  289.     Works great.
  290.  
  291.     In addition, there are people that want to set up multiple printer
  292.     queues using the BSD queueing mechanism.  Here is a brief tutorial:
  293.  
  294.     Lpf is mainly intended for processing text and nroffed output...it 
  295.     isn't anything clean...it will do certain games that will mess up 
  296.     PCL output.
  297.  
  298.     If you're producing straight PCL or Postscipt (assuming your LJ 
  299.     takes it), then you want to print directly to the printer w/o any 
  300.     processing.  
  301.  
  302.     What you really want is a "physical" queue that does no processing, 
  303.     and several logical queues that map back to the physical queue and 
  304.     do processing...or one "smart" queue that does file content 
  305.     recognition and then maps to the raw queue.
  306.  
  307.     I do something like this for my DeskJet.  There is one raw queue 
  308.     and several logical queues (some postscript that do different 
  309.     resoultions and color depth, some text that do various formatting, 
  310.     etc).  When I get the time I'll be trying to set up a "smarter" 
  311.     queue using aps and maybe some bits from flexfax.
  312.  
  313.     To map logical to physical queues either use a filter that pipes 
  314.     back into lpr -P<rawqueue> itself, or just point it at the "raw" 
  315.     queue using something like:
  316.  
  317.     textlp|Text Printing:\
  318.         :lp=/dev/null:\
  319.         :if=/usr/libexec/lpr/lpf:\
  320.         :rm=localhost:\
  321.         :rp=lj.raw:
  322.  
  323.     And other entries as needed, you get the idea...to use an output 
  324.     filter instead of the rm/rp approach (more efficent), you can get 
  325.     away with something like:
  326.  
  327.         :of=/usr/local/bin/printraw:
  328.  
  329.     where /usr/local/bin/printraw looks like this:
  330.  
  331.     #!/bin/sh
  332.     cat | lpr -h -Plj.raw
  333.  
  334.  
  335. 5.3.2    Terminals/Keyboards
  336.  
  337.     Terminals are relatively simple to add.  It involves making sure the 
  338.     /etc/ttys file identifies the com port (com0, com00, or tty00 
  339.     depending on your configuration) as an active port and a getty is
  340.     running.  The man page for ttys and getty help explain this.
  341.  
  342.     Many people report that there are sometimes problems running some
  343.     programs on a remote terminal.  There are some known bugs in the
  344.     terminal handler where the parity and bits per character are 
  345.     concerned.  They are being worked on.
  346.  
  347.  
  348. 5.3.3    Modems
  349.  
  350.     How to add a modem to 386BSD:
  351.  
  352.     The first part that confused me was assuming that /dev/com1 is 
  353.     the same as DOS com1, they're not.  /dev/com0 is connected to 
  354.     COM1 and (I think) /dev/com1 is connected to COM2.
  355.  
  356.     The switch settings for my modem were the same as what I had 
  357.     under DOS, CTS CD RTS et al were set to follow the actual line 
  358.     (i.e. my modem can force them high, which I turn off)
  359.  
  360.     Ok that's not too bad.
  361.  
  362.     Now you need to edit the /etc/remote file to include a reference 
  363.     to the com port. I have only used NetBSD-0.8, so I'm not sure 
  364.     what the default files are like that come with the other rev's 
  365.     of 386BSD.
  366.  
  367.     I added the last line (with com0).
  368.     --------------------------------------------------------
  369.     #    @(#)remote    5.2 (Berkeley) 6/30/90
  370.     #
  371.  
  372.     ...stuff deleted...
  373.  
  374.     # UNIX system definitions
  375.     unix1200|1200 Baud dial-out to another UNIX system:\
  376.         :el=^U^C^R^O^D^S^Q:ie=%$:oe=^D:tc=dial1200:
  377.     unix300|300 Baud dial-out to another UNIX system:\
  378.         :el=^U^C^R^O^D^S^Q:ie=%$:oe=^D:tc=dial300:
  379.  
  380.     ...stuff deleted...
  381.  
  382.     dial2400|2400 Baud Hayes attributes:\
  383.             :dv=/dev/tty19:br#2400:cu=/dev/tty19:at=hayes:du:
  384.     dial1200|1200 Baud Hayes attributes:\
  385.             :dv=/dev/tty19:br#1200:cu=/dev/tty19:at=hayes:du:
  386.     
  387.     # Hardwired line
  388.     com1c|com1:dv=/dev/com1:br#9600:
  389.     com1b:dv=/dev/com1:br#2400:
  390.  
  391.     com0:com0:dv=/dev/com0:br#9600:at=hayes:
  392.     ------------------------------------------------
  393.  
  394.     Ok, now if you are running as root you can use type 'tip com0' 
  395.     and you should then be talking to your modem.  I use kermit to 
  396.     transfer files, and it wants to create a lock file in (not sure 
  397.     about the exact path) /var/spool/uucp/lock or something along 
  398.     those lines.  I made the directory world writeable so I could 
  399.     run kermit with my own uid, rather than root.
  400.  
  401.     Also, you may need to add an entry in /etc/remote for com0.
  402.  
  403.     Thanks also to thombsr@liciren.li.co.uk for information on how 
  404.     to do this.
  405.  
  406.     New problems have surfaced with the latest releases of NetBSD.
  407.     It seems that the paradigm that the com port used to use was
  408.     'less than complte' and much of the code has been replaced. 
  409.     This provides for some interesting new problems.  The first is
  410.     that the Carrier Detect line is no longer ignored, as it was
  411.     before.  This means that programs like kermit and tip/cu either
  412.     have to be told explicitly to ignore the CD line (in kermit,
  413.     for example, you would use the 'set carrier off' in your .kermrc)
  414.     or you need to use the 'stty -f /dev/com? clocal' command before
  415.     you open the port.
  416.  
  417.     If you have trouble getting the settings to 'stick' it is because
  418.     the ports are now initialized to known settings on the last close
  419.     of the port.  A workaround for this is to use the command:
  420.  
  421.         sleep 1000 < /dev/com?
  422.         tip ...
  423.          { or }
  424.         kermit ...
  425.  
  426.     This will keep the port open for about 12 minutes while you do 
  427.     whatever it is you need to do.  Once the port is open and your
  428.     connection established, the port will not reset until the final
  429.     close.
  430.  
  431.     Another symptom of this malady is described below.
  432.  
  433.     When I 'set line' in kermit, it hangs until I hit my escape
  434.     character (^\).  It *does* set the line (and the rest of my session 
  435.     is normal), but it's annoying because I can't put 'set line' in
  436.     my .kermrc. 
  437.  
  438.     The answer is available in the kermit documentation as well as
  439.     here (now).  The following commands are MY .kermrc file:
  440.  
  441.  
  442.         set carrier off
  443.         set line /dev/com2
  444.         set speed 38400
  445.         set modem hayes
  446.         set dial speed on
  447.         set dial timeout 60
  448.  
  449.     The 'set carrier off' tells kermit to ignore the Carrier Detect
  450.     line from the modem, and to proceed as if the command were
  451.     there.  This will (as far as I have ever been able to find
  452.     out) fix the specific problem with not being able to set the
  453.     line.
  454.         
  455.  
  456. 5.3.4    What is the trick for getting Kermit to work with rz and sz?
  457.  
  458.     Add these lines to your .kermrc file.  They should do the trick.
  459.  
  460.     define sz !sz \%1 \%2 \%3 \%4 \%5 \%6 \%7 \%8 \%9 < \v(line) > \v(line)
  461.     define rz !rz \%1 \%2 \%3 \%4 \%5 \%6 \%7 \%8 \%9 < \v(line) > \v(line)
  462.  
  463.  
  464. 5.4    Tape Drives
  465.  
  466.     This section should help out for those of you that have either
  467.     never used tape drives before, or only have experience with them
  468.     as non-Unix devices.
  469.  
  470.  
  471. 5.4.1    Does the tape need to be formatted?
  472.  
  473.     It depends, but I think usually not.  And when it is necessary,
  474.     I don't know how it would be done.  One thing is for certain, 
  475.     though, first....  NEVER use the block devices..  erase them and 
  476.     forget you ever saw them.  All operations on tape should be to 
  477.     the character device (rst0).
  478.  
  479.  
  480. 5.4.2    If I execute the command 'st -f /dev/st0 status', I get:
  481.         Archive/Tandberg? tape drive, residual=0, blocksize=512
  482.         Density: high = 16 (0x10), medium = 15 (0xf), low = 5 (0x5)
  483.         ds=0
  484.         er=0
  485.  
  486.     so to write to tape at high-density (QIC-150), presumably I want 
  487.     to use a device with minor number +4 (in st.c, density is computed as
  488.     minor >> 2 & 0x03, where low density == 3 and high == 1):
  489.  
  490.     You have the idea.. density is controlled by bits 2 and 3
  491.  
  492.         00 = default
  493.         01 = hi density
  494.         10 = medium density
  495.         11 = low density, 
  496.  
  497.     Unless the driver knows about you kind of drive the density values
  498.     may need to be set by hand before they make any sense.
  499.  
  500.  
  501. 5.4.3    When is erst0 used?
  502.  
  503.     e stands for 'eject' and is bit 1 of the minor.. 
  504.     e.g. eject on close.. many devices can't actually do this.
  505.  
  506.     There is actually a method to this whole thing:
  507.  
  508.         r = raw        (rst0)
  509.         e = eject    (erst0)
  510.         n = No rewind    (nrst0 or maybe nerst0)
  511.  
  512.  
  513. 5.4.4    How is density (bpi) computed?  I am using 3M DC 6250 cassettes 
  514.     which have a 250MB capacity on the Viper 150.  But computing the 
  515.     bits/inch based on 250MB/tape-length (1020 ft.), I get a density 
  516.     of 171335 bpi, which is nowhere near the 10000 bpi associated 
  517.     with QIC-150 in the st(1) man page.  Why the discrepancy?
  518.  
  519.     These cartridge tapes are written in narrow tracks which 
  520.     alternately begin at opposite ends of the tape.  Track 0 starts 
  521.     at the beginning of the tape, and Track 1 starts at the other 
  522.     end, etc.
  523.  
  524.     So, how many times does the tape go backwards and forwards?  If 
  525.     there are 17 tracks, your density is 170000 bpi if it is 10000
  526.     bpi per track.  The more tracks, the lower the bpi/track.
  527.  
  528.  
  529. 5.4.5    How is an appropriate block size determined (and in what units 
  530.     are they specified in the st(1) command)?
  531.  
  532.     QIC 150 and below should stick to 512 byte blocks a write of 
  533.     1024 bytes from the program will be written as 2 512 byte blocks 
  534.     with no speed penalty.  dd will think it's writing a 1024 byte 
  535.     block but on tape it's 2 x 512.
  536.  
  537.     Stick to 512 on QIC 150 or less if you ever hope to swap data 
  538.     with anyone else.
  539.  
  540.  
  541. 5.4.6    From the 4.3BSD mtio(4) man page, it sounds like data is typically
  542.     (traditionally?) stored on tape in eof-terminated sequences of 
  543.     1K records.  
  544.  
  545. 5.4.6.1    Is st's notion of "file" the record sequence between two eof marks?  
  546.  
  547. 5.4.6.2    What about a "record"?  
  548.  
  549. 5.4.6.3    Is a "record" one "block", as determined by st's "blocksize" command?   
  550.     If not, what is the connection between them?  
  551.  
  552. 5.4.6.4    Can I change the "record" size?  
  553. 5.4.6.5    When would I want a block size that is different from the default?  
  554.     1KB is the size of writes used by dd or whatever.  QIC specifies 
  555.     512 byte records (well at least its what people use..)  Whatever 
  556.     you write in will be broken into 512 byte sections.  They must be 
  557.     multiples of 512 though.
  558.  
  559.     If you have written to a tape, a close will automatically append a 
  560.     filemark (eof mark).  You may read the 512 byte blocks back as 
  561.     512 byte records or as 1024 byte records (in which case you'll 
  562.     get 2 at once).  The bigger the unit, the more efficient.
  563.  
  564. 5.4.7.1    How do I write several archives to a single tape?  I tried without 
  565.     success:
  566.         $ st -f /dev/rst4 rewind
  567.         $ tar cf /dev/nst4 archive1
  568.         $ st -f /dev/nrst4 weof
  569.         $ tar cf /dev/nst4 archive2
  570.         $ st -f /dev/nrst4 weof
  571.  
  572.     First:  throw away the block devices.
  573.  
  574.     'n' stands for 'No-Rewind-on-close' and will leave the tape 
  575.     positioned ready for another file e.g.
  576.  
  577.         tar -cf /dev/nrst0 archive1
  578.         tar -cf /dev/nrst0 archive2
  579.  
  580.  
  581. 5.4.7.2    Later, I would expect to be able to access, say, archive3 via the fsf
  582.     directive to skip over the first two archives.  What is the correct
  583.     sequence?
  584.  
  585.         st -f /dev/nrst0 rewind
  586.         st -f /dev/nrst0 fsf 2
  587.         tar -xf /dev/rst0 {files}
  588.  
  589.  
  590. 5.4.8    Since the Viper 150 writes on QIC-150/120, I guess I don't need 
  591.     to worry about writing variable-length records?  How about reading 
  592.     a tape written with variable-length records.  Is this possible 
  593.     with the Viper?  If so, what's involved?
  594.  
  595.  
  596.     Who would have written it? :-)
  597.  
  598.     Presently you can't.  You`re right.  Don't worry about it.
  599.  
  600.     The new 'st' changes will change this somewhat, though.
  601.  
  602.  
  603. 5.4.9    The very scant documentation that came with my drive mentions
  604.     a "selectable buffer disconnect size," whose default is 16K.
  605.     This is evidently the "maximum number of bytes that can be 
  606.     sent over the SCSI bus during a single data transfer phase."  
  607.     What's that?  How is it connected st's "blocksize" command?  
  608.     Do I want to use 16K blocks, or might I even want to set the 
  609.     disconnect size to a higher value?
  610.  
  611.     This suggests that 32 512 blocks will be written at a time.
  612.     This jives with the tape format for some of the lower density 
  613.     cartridges (QIC-40 and 80, for example).  The tape is written 
  614.     in blocks of 32 512-byte blocks, with the last three being used
  615.     for Error Correction Codes.  
  616.  
  617.     Use dd or tar with 16 k blocks and 32 x 512 byte blocks will be 
  618.     written.
  619.  
  620. 5.4.10    What is "streaming"?  When I tar a directory of files to tape,
  621.     I notice that the tape often stops.  Streaming means it doesn't 
  622.     stop?  How would I get the viper 150 to stream using tar or cpio 
  623.     or dump?
  624.  
  625.     Use a bigger write size... (more efficient)  Try 16k blocks.
  626.  
  627.  
  628. 5.4.11    Where are all the answers to the above and related questions 
  629.     written down?  Neither on the net nor in the 4.3BSD manuals 
  630.     nor Administration text which I have could I find this stuff 
  631.     covered!
  632.  
  633.     They are in the FAQ :-)...
  634.  
  635.  
  636. 5.4.12    What else should I know?  For example, it seems that a new tape 
  637.     must stretched.  How is this done?
  638.  
  639.     Use a blowtorch and a pair of pliers;  or you can use the 
  640.     non-destructive method and run the tape through a complete fast 
  641.     forward/rewind cycle to get it tight on the spindles.
  642.  
  643.  
  644. 5.4.13    My tape drive doesn't work.  
  645.  
  646.     OK.  There are lots of reasons why it may not.  The most obvious is
  647.     that there are no devices associated with the device in the kernel.
  648.     You can check this through the use of the 'dmesg' command.  Look
  649.     for tape drives.
  650.  
  651.     If your tape drive is connected to your floppy controller, it may
  652.     or may not be supported.  Several manufacturers of QIC-40/QIC-80
  653.     minicartridge drives are supported natively in FreeBSD and 
  654.     experimentatlly in NetBSD.  Some aren't (mine for example, is not).
  655.  
  656.     If your tape drive is a SCSI based drive, your guess is as good as 
  657.     mine.  I don't have one.
  658.  
  659.  
  660. 5.5    Network
  661.  
  662.     Network devices for NetBSD and FreeBSD include many types of
  663.     Ethernet cards, as well as Serial Line IP and Point to Point
  664.     Protocol.
  665.  
  666. 5.5.1    How can I get my system to work as a network router?
  667.  
  668.     The first hurdle to overcome is that the default kernels do not
  669.     have the GATEWAY option compiled in.  Without this, it is very
  670.     nearly impossible to use the kernel as a router.
  671.  
  672.     Once you have the GATEWAY option compiled in, all sorts of things
  673.     magically start to work.  
  674. -- 
  675. TSgt Dave Burgess           | Dave Burgess
  676. NCOIC, USSTRATCOM/J6844     | *BSD FAQ Maintainer
  677. Offutt AFB, NE              | Burgess@cynjut.infonet.net or ...@s069.infonet...
  678.                                
  679.  
  680.